<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    li{
      width: 400px;
      height: 50px;
      background-color: #e1e7d3;
      margin-top: 20px;
    }
  </style>
</head>
<body>
  <div id="app">
    <button @click="changeData">修改a属性</button>
    {{ obj.a }}
  </div>
  <script src="./vue.js"></script>
  <script>
    const vm = new Vue({
      data: {
        obj: {
          // a: ""
        }
      },
      methods: {
        changeData(){
          // this.obj.a = '这是a属性';
          this.$set(this.obj,'a', 'a属性的值')
        }
      },
    })
    vm.$mount('#app')
  </script>
</body>
</html>